

package com.pig.util;


import java.util.List;

public class SysResultLayui<T> {
    private Integer code;
    private String msg;
    private Integer count;
    private List<T> data;

    public static SysResultLayui fail(){
        return new SysResultLayui(201,"服务器调用失败",0,null);
    }
    public static SysResultLayui success(){
        return new SysResultLayui(200,"服务器调用成功",1000,null);
    }
    public static SysResultLayui success(List data){
        return new SysResultLayui(200,"服务器调用成功",1000,data);
    }
    public static SysResultLayui success(String msg, List data){
        return new SysResultLayui(200,msg,1000,data);
    }

    public SysResultLayui() {
    }

    public SysResultLayui(Integer code, String msg, Integer count, List<T> data) {
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }



    public String toString() {
        return "SysResultLayui{code=" + this.code + ", msg='" + this.msg + '\'' + ", count=" + this.count + ", data=" + this.data + '}';
    }

    public Integer getCode() {
        return this.code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCount() {
        return this.count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public List<T> getData() {
        return this.data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
